# -*- coding: utf-8 -*-
"""
****************************
@Time    : 2021/4/25 11:33
@Author  : Candy
@File    : main.py
****************************
"""
from flask import render_template, redirect

from config.db import LOCAL_HOST
from sqlconfig import app
from views.article import article
from views.user import user

app.register_blueprint(article, url_prefix="/article")
app.register_blueprint(user, url_prefix="/user")


@app.route('/', methods=["GET"])
def api_index():
    return redirect('/static/templates/index.html')


if __name__ == '__main__':
    app.run(host='0.0.0.0', port=LOCAL_HOST, debug=True)
